package com.triadsystems.cashweb.modelo.persistencia.entidades;

import java.math.BigDecimal;
import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import com.triadsystems.cashweb.modelo.persistencia.enums.TipoMovimentacaoEnum;

@Entity
@Table
@SequenceGenerator(name = "seq_movimentacao", sequenceName = "cw_seq_movimentacao", initialValue = 1, allocationSize = 1)
public class Movimentacao extends ValueObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column
	@GeneratedValue(generator = "seq_movimentacao", strategy = GenerationType.SEQUENCE)
	@Getter
	@Setter
	private Long entityId;

	@Getter
	@Setter
	@Enumerated
	TipoMovimentacaoEnum tipoMovimentacao;

	@Getter
	@Setter
	private String codigoDeBarra;

	@Getter
	@Setter
	private Calendar dataMovimentacao;

	@Getter
	@Setter
	private BigDecimal valor;

	@Getter
	@Setter
	private String descricao;

	@Getter
	@Setter
	@Enumerated
	private MesEnum mesFatura;

	@Getter
	@Setter
	private Integer anoFatura = Calendar.getInstance().get(Calendar.YEAR);

	@Getter
	@Setter
	@ManyToOne
	private Caixa caixa;

	/**
	 * UsuARIO????
	 * 
	 * @ManyToOne private Usuario usuario;
	 */
	@Getter
	@Setter
	private String codigoMatricula;
	@Getter
	@Setter
	private String nomeAtendente;

	@Getter
	@Setter
	private String matricula;
	/*
	 * @Getter @Setter
	 * 
	 * @ManyToOne(targetEntity = TransacaoPagamento.class, cascade =
	 * CascadeType.ALL) private TransacaoPagamento transacaoPagamento;
	 */

}
